package problem.ej2;

import java.util.Comparator;

public class VerticalHurdlesComparator implements Comparator<Valla> {

	@Override
	public int compare(Valla hurdle1, Valla hurdle2) {

		if (hurdle1.getX() < hurdle2.getX())
			return -1;
		else if (hurdle1.getX() > hurdle2.getX())
			return 1;
		
		
		//Sino, son iguales.
		return 0;
	}
}
